package com.xian.im.modules.im.core.account;

import com.xian.im.common.sequence.UniqueSnowFlakeGenerate;
import com.xian.im.common.utils.sys.SpringContextHolder;
import com.xian.im.modules.im.core.IAccountCoreService;

/**
 * @program: xian-code
 * @description:
 * @author: liru.xian
 * @create: 2021-01-21 20:18
 **/
public abstract class AbsAccountCore implements IAccountCoreService {

    /**
     * 唯一ID 生成
     *
     * @param prefix
     * @return
     */
    @Override
    public String generateId(String prefix) {
        UniqueSnowFlakeGenerate bean = SpringContextHolder.getBean(UniqueSnowFlakeGenerate.class);
        return bean.getSerialId(prefix);
    }
}
